package com.apchernykh.rozhlasapp.player;

import com.apchernykh.rozhlasapp.player.fallback.IFallbackPlayer;
import com.apchernykh.rozhlasapp.player.fallback.RozhlasNativeFallbackPlayerErroneousStub;
import com.apchernykh.rozhlasapp.player.fallback.RozhlasProxyFallbackPlayerErroneousStub;


public class MediaPlayerWrapperErroneousStub extends MediaPlayerWrapper {

	public MediaPlayerWrapperErroneousStub(IPlaybackCallbacks iService) {
		super(iService);
	}

	@Override
	protected IFallbackPlayer instantiateFallbackPlayer(String iURL,
			int iPlayerType) {
		if (iPlayerType == 0) {
			return new RozhlasNativeFallbackPlayerErroneousStub(mContext, iURL);
		}
		if (iPlayerType == 1) {
			return new RozhlasProxyFallbackPlayerErroneousStub(mContext, iURL);
		}
		return super.instantiateFallbackPlayer(iURL, iPlayerType);
	}

}